function $(id){
	return document.getElementById(id);
}
/**
 * is remember pwd
 */
function remPwds(){
	$("remPwd").value = $("remPwd").checked==""? 0:1;
}
/**
 * page jumps
 * @param id
 */
function toPage(id){
	$("pageId").value = id.innerHTML;
	$("formPage").submit();
}
function problemDetail(id){
	$("problemId").value = id;
	$("formProblem").submit();
}
function roleInfo(roleId){
	var obj = document.getElementById("roleList");
	obj.action = "roleInfo.do?roleId="+roleId;
	obj.submit();
}
function payout(){
	$("form").action = "payout.do";
	$("form").submit();
}
function closeProblem(){
	$("form").action = "closeProblem.do";
	$("form").submit();
}
var time = 3;
var tt = 0;
function toNewPage(name,toName,toPageAddress){
	tt = setTimeout(function() {
		time--;
		$("tip").innerHTML = name + "," + time + "秒后自动跳转到" + toName + "...";
		if(time <= 0){
			clearTimeout(tt);
			location.href = toPageAddress;
		}else{
			toNewPage(name,toName,toPageAddress);
		}
	}, 1000);
}
function queryErro(){
	if($("queryErroAlert").innerHTML.length > 0){
		setTimeout(function() {
			$("queryErroAlert").style.display = "none";
		}, 2000);
	}
}

function projectDetail(id){
	$("projectId").value = id;
	$("formProject").submit();
}
function openOrClose(){
	$("form").action = "openOrClose.do";
	$("form").submit();
}
function updateProject(id){
	$("form").action = "updateProject.do";
	$("form").submit();
}
function deleteProject(){
	$("form").action = "deleteProject.do";
	$("form").submit();
}
function queryProject(){
	$("form").action = "queryProject.do";
	$("form").submit();
}
function employeeDetail(id){
	$("employeeId").value = id;
	$("formEmployee").submit();
}
function playerRemove(id){
	$("employeeId").value = id;
	$("formPlayer").submit();
}